package com.leyou.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;

/**
 * @version V1.0
 * @author: Ljxpa
 * @date: 2020/03/06 11:49
 * @description: 将application.yml中的属性值读取进来，并封装成一个pojo交给spring容器
 */
@Data
@Component
@ConfigurationProperties("ly.oss")//读取配置文件中的哪个根元素
public class OSSProperties {
	private String accessKeyId;
	private String accessKeySecret;
	private String bucket;
	private String host;
	private String endpoint;
	private String dir;
	private long expireTime;
	private long maxFileSize;
}
